<?php
    if(is_array($result))
	{
		header('Content-Type: application/json; Charset=UTF-8',true);
		$jsonData = array('page'=>$facturaFN->page,'total'=>$facturaFN->numeroRegistros,'rows'=>array());
		foreach ($result as $key => $obj)
		{
			$entry = array('id'=>$obj->getFacId(),
			    'cell'=>array(
			    
			            'facId' =>$obj->getFacId(),
			            'facNro' =>$obj->getNum(),
			            'proveedorId'=>$obj->getProveedorId(),
			            'proveedorName'=>utf8_encode($obj->getProveedorNombre()),
			            'status'=>$obj->getStatus(),
			            'opciones'=>"<img border='0' title='Editar Item' src='/gourmet-express/trunk/imgs/icons/page_edit.png' onclick=fn_editar('". $obj->getFacId()."') style='cursor:pointer;'>"
			    ),
			);
			$jsonData['rows'][] = $entry;
		}
		echo json_encode($jsonData);
	}?>